package com.kx.center.mappers;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.kx.center.entity.Advertisement;
import com.kx.center.entity.Food;
import com.kx.center.entity.FoodCategory;
import com.kx.center.entity.FoodType;
import com.kx.center.entity.query.QueryFoodCategory;

public interface FoodMapper {
	//食品分类
	public int insertFoodCategory(FoodCategory foodCategory);
	public List<FoodCategory> findFoodCategoryList(QueryFoodCategory queryFoodCategory);
	public Integer findFoodCategoryCount(QueryFoodCategory queryFoodCategory);
	public FoodCategory findFoodCategoryById(Integer id);
	public void updateFoodCategoryById(FoodCategory foodCategory);
	public void deleteFoodCategoryById(FoodCategory foodCategory);
	public FoodCategory findFoodCategoryByName(@Param("name")String name, @Param("companyId")Integer companyId);
	public List<FoodCategory> findAllFood(Integer companyId);
	//食品
	public int insertFood(Food food);
	public List<Food> findFoodList(QueryFoodCategory queryFoodCategory);
	public Integer findFoodCount(QueryFoodCategory queryFoodCategory);
	public void updateFoodById(Food food);
	public void deleteFoodById(Food food);
	public Food findFoodBySku(@Param("sku")String sku, @Param("companyId")Integer companyId);
	public List<Food> findFoodByCategoryId(Integer id);
	public List<Food> findFoodByUnitId(Integer id);
	public Food findFoodById(Integer id);
	//食品规格
	public int insertFoodType(FoodType foodType);
	public List<FoodType> findFoodTypeList(QueryFoodCategory queryFoodCategory);
	public Integer findFoodTypeCount(QueryFoodCategory queryFoodCategory);
	public FoodType findFoodTypeById(Integer id);
	public FoodType findFoodTypeByName(@Param("name")String name, @Param("companyId")Integer companyId);
	public void updateFoodTypeById(FoodType foodType);
	public void deleteFoodTypeById(FoodType foodType);
	public List<Advertisement> findAdvertisement();
	
}
